//
//  Validator.swift
//  User
//
//  Created by ET|冰琳 on 2017/1/9.
//  Copyright © 2017年 IB. All rights reserved.
//

import Foundation

public protocol Validator: class {
    
    func validate(txt: String?) -> Bool
}

public extension Validator{

    func validate(txt: String?) -> Bool {
        guard let txt = txt else {
            return false
        }
        return !txt.isEmpty
    }
}




/// empty implement
public class DefaultValidator: NSObject, Validator {}
